//
//  YLInvestmentCertificateModel.m
//  YLFinanceService
//
//  Created by she1323 on 2017/10/26.
//  Copyright © 2017年 she1323. All rights reserved.
//  投资券

#import "YLInvestmentCertificateModel.h"

@implementation YLInvestmentCertificateModel


- (void)setEffectiveDate:(NSString *)effectiveDate
{
    _effectiveDate = effectiveDate;
    
    if (effectiveDate.length > 10) {
        _effectiveDate = [effectiveDate substringToIndex:10];
    }
    
}

- (void)setExpirationDate:(NSString *)expirationDate
{
    _expirationDate = expirationDate;
    if (expirationDate.length > 10) {
        _expirationDate = [expirationDate substringToIndex:10];
    }
}
- (NSDictionary *)properties_aps

{
    
    NSMutableDictionary *props = [NSMutableDictionary dictionary];
    
    unsigned int outCount, i;
    
    objc_property_t *properties = class_copyPropertyList([self class], &outCount);
    for (i = 0; i < outCount; i++)
        
    {
        
        objc_property_t property = properties[i];
        
        const char* char_f = property_getName(property);
        
        NSString *propertyName = [NSString stringWithUTF8String:char_f];
        
        id propertyValue = [self valueForKey:(NSString *)propertyName];
        
        if (propertyValue) [props setObject:propertyValue forKey:propertyName];
        
    }
    
    free(properties);
    
    return props;
    
}

@end

@implementation YLInvestmentCertificateItem

+ (NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass
{
    return @{@"items" : [YLInvestmentCertificateModel class]};
}

@end
